package com.hong.servicecmn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hong.model.model.cmn.Dict;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DictMapper extends BaseMapper<Dict> {
    int deleteByPrimaryKey(String id);

    int insert(Dict record);

    int insertSelective(Dict record);

    Dict selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Dict record);

    int updateByPrimaryKey(Dict record);

    List<Dict> findChildData(Long id);

    int hasChildren(Long id);

    int countDirectChildren(Long id);

    List<Dict> findAllDict();

    Dict selectByValue(String value);

    String selectByDictCode(String dictCode);

    Dict findByValueAndParentId(@Param("value") String value, @Param("parentId") String parentId);

    Dict getDictByDictCode(String dictCode);
}